package com.itheima.tlias84.controller;

import com.itheima.tlias84.entity.Teacher;
import com.itheima.tlias84.utils.ResultUtil;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
public class TestbeanTeacher {

    @Resource(name = "lisi")
    Teacher teacher;
    @GetMapping("/bean")
    public ResultUtil createTeacherBean() {
        log.info("teacher:{}",teacher);
        return ResultUtil.success(teacher);
    }
}

